package main

import (
	"p5/model"
	"fmt"
	"math/rand"
	"sort"
)

func main()  {
	var students model.StudentSclice
	for i := 0; i < 10; i++ {
		student := model.NewStudent("student" +string(i), rand.Intn(30), rand.Float32())
		students = append(students, *student)
	}
	
	fmt.Println("排序前", students)
	sort.Sort(students)
	fmt.Println("排序后", students)
}